# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=getopt
pkgver=1.1.6
pkgrel=2
pkgdesc="Utility to help shell scripts parse command-line parameters"
arch=('i686' 'x86_64')
url="http://software.frodo.looijaard.name/getopt/"
license=('GPL2')
depends=('msys2-runtime' 'sh')
options=('!emptydirs')
source=(http://frodo.looijaard.name/system/files/software/getopt/${pkgname}-${pkgver}.tar.gz)
sha256sums=('d0bf1dc642a993e7388a1cddfb9409bed375c21d5278056ccca3a0acd09dc5fe')

build() {
  cd ${srcdir}/$pkgname-$pkgver

  make WITHOUT_GETTEXT=1
}

package() {
  cd ${srcdir}/$pkgname-$pkgver
  make DESTDIR=${pkgdir} prefix=/usr mandir=/usr/share/man install
  # license
  install -m644 -D COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}
